﻿package net.imonair.msn.utils {
	import net.imonair.msn.contacts.MSNStatus;
	import net.imonair.core.contacts.IMStatus;
	public function simplifyStatus(status:String):String {
		switch (status) {
			case MSNStatus.ONLINE:
				return IMStatus.ONLINE;
				break;
			case MSNStatus.IDLE:
			case MSNStatus.BE_RIGHT_BACK:
			case MSNStatus.OUT_TO_LUNCH:
			case MSNStatus.IN_A_CALL:
			case MSNStatus.AWAY:
				return IMStatus.IDLE;
				break;
			case MSNStatus.HIDDEN:
				return IMStatus.HIDDEN;
				break;
			case MSNStatus.OFFLINE:
				return IMStatus.OFFLINE;
				break;
			default:
				trace("Error, " + status + " is not valid status string!");
				return status;
		}
	}
}